package com.jshoperxms.service.impl;


import com.jshoperxms.controller.utils.DateTools;
import com.jshoperxms.entity.SerialT;
import com.jshoperxms.service.SerialTService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service("serial")
public class Serial {


	@Resource
	private SerialTService serialTService;




	@Transactional(propagation= Propagation.REQUIRED)
	public String Serialid(String serialkey) {
		SerialT list = this.serialTService.SerialTlastId(serialkey);
		return DateTools.tagdate() + list.getHead() + list.getLastid();
	}

}
